
#include "GIFImageFormat.h"

int width = 0;
int height = 0;
int bpp = 0;
bool interlaced = false;

GIFImageFormat::GIFImageFormat() : ImageFormat() {
    
}
    
bool ImageFormat::parseFile(const char* filename) {
    int* error;
    GifFileType* file = DGifOpenFileName(filename, error);
    
    width = file->SWidth;
    height = file->SHeight;
    
    DGifCloseFile(file);

    return true;
}

int ImageFormat::getWidth() {
    return width;
}

int ImageFormat::getHeight() {
    return height;
}

int ImageFormat::getBitsPerPixel() {
    return bpp;
}

bool ImageFormat::isInterlaced() {
    return interlaced;
}